/*
 * @Author: error: error: git config user.name & please set dead value or install git && error: git config user.email & please set dead value or install git & please set dead value or install git
 * @Date: 2025-01-16 18:32:39
 * @LastEditors: error: error: git config user.name & please set dead value or install git && error: git config user.email & please set dead value or install git & please set dead value or install git
 * @LastEditTime: 2025-01-17 23:38:59
 * @FilePath: \vue\src\router\index.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import Vue from 'vue'
import VueRouter from 'vue-router'
import Login from '../views/Login2.vue'
import Home from '../views/Home.vue'
import Detail from '../views/Detail2.vue'
import Cultiver from '../views/Cultiver2.vue'
import historyData from '../views/data/history.vue'
import reportData from '../views/data/report.vue'
import deviceManage from '../views/device/manage.vue'
import deviceCamera from '../views/device/camera.vue'
import userAdd from '../views/user/add.vue'
import tousiplan from '../views/data/tousi.vue'

Vue.use(VueRouter)

export default new VueRouter({
  mode: 'history',
  routes: [
    {
      path: '/',
      meta: { withMenu: true },
      redirect: '/login',
    },
    {
      path: '/login',
      name: 'Login',
      component: Login,
      meta: { withMenu: false }
    },
    {
      path: '/Home',
      name: 'Home',
      component: Home,
      meta: { withMenu: false }
    },
    {
      path: '/detail',
      name: 'Detail',
      component: Detail,
      meta: { withMenu: false }
    },
    {
      path: '/cultiver',
      name: 'Cultiver',
      component: Cultiver,
      meta: { withMenu: false }
    },
    {
      path: '/data/history',
      name: 'historyData',
      component: historyData,
      meta: { withMenu: true, pathName: '数据中心 / 历史数据' }
    },
    {
      path: '/data/report',
      name: 'reportData',
      component: reportData,
      meta: { withMenu: true, pathName: '数据中心 / 统计报表' }
    },
    {
      path: '/data/tousi',
      name: 'tousiplan',
      component: tousiplan,
      meta: { withMenu: true, pathName: '数据中心 / 投饲计划' }
     },
    {
      path: '/device/manage',
      name: 'deviceManage',
      component: deviceManage,
      meta: { withMenu: true, pathName: '设备中心 / 设备管理' }
    },
    {
      path: '/device/camera',
      name: 'deviceCamera',
      component: deviceCamera,
      meta: { withMenu: true, pathName: '设备中心 / 摄像头管理' }
    },
    {
      path: '/user/add',
      name: 'userAdd',
      component: userAdd,
      meta: { withMenu: true, pathName: '用户管理 / 新增用户' }
    },
    {
      path: '/register',
      name: 'register',
      component: userAdd,
      meta: { withMenu: false }
    },
  ]
})
